const routes = [
  {
    path: "/",
    redirect: "/loginRegister",
  },
  {
    path: "/loginRegister",
    redirect: "/loginRegister/login",
    component: () => import("@/pages/loginRegister/index.vue"),
    children: [
      {
        path: "login",
        name: "Login",
        component: () => import("@/pages/loginRegister/views/login/index.vue"),
      },
      {
        path: "register",
        name: "Register",
        component: () =>
          import("@/pages/loginRegister/views/register/index.vue"),
      },
    ],
  },
  {
    path: "/admin",
    redirect: "/admin/addUser",
    component: () => import("@/pages/admin/index.vue"),
    children: [
      {
        path: "addUser",
        name: "addUser",
        component: () => import("@/pages/admin/views/addUser/index.vue"),
      },
      {
        path: "showAddUser",
        name: "showAddUser",
        component: () => import("@/pages/admin/views/showAddUser/index.vue"),
      },
    ],
  },
  {
    path: "/jurisdiction",
    name: "Jurisdiction",
    component: () => import("@/pages/jurisdiction/index.vue"),
  },
  {
    path: "/user",
    name: "User",
    redirect: "/user/buyer/listing/list",
    component: () => import("@/pages/user/index.vue"),
    children: [
      {
        path: "home",
        name: "Home",
        component: () => import("@/pages/user/views/home/index.vue"),
      },
      {
        path: "enterprise",
        name: "Enterprise",
        component: () => import("@/pages/user/views/enterprise/index.vue"),
      },
      {
        path: "transaction",
        name: "Transaction",
        component: () => import("@/pages/user/views/transaction/index.vue"),
      },
      {
        path: "detail/:id",
        name: "TransactionDetail",
        component: () =>
          import("@/pages/user/views/transaction/component/detail.vue"),
      },
      {
        path: "buyer/listing",
        name: "BuyerListing",
        component: () => import("@/pages/user/views/buyerListing/index.vue"),
      },
      {
        path: "seller/listing",
        name: "SellerListing",
        component: () => import("@/pages/user/views/sellerListing/index.vue"),
      },
      {
        path: "own/seller/listing/list",
        name: "OwnSeller",
        component: () => import("@/pages/user/views/ownSeller/index.vue"),
      },
      {
        path: "own/buyer/listing/list",
        name: "OwnBuyer",
        component: () => import("@/pages/user/views/ownBuyer/index.vue"),
      },
      {
        path: "buyer/listing/list",
        name: "BuyerList",
        component: () => import("@/pages/user/views/buyerList/index.vue"),
      },
      {
        path: "seller/listing/list",
        name: "SellerList",
        component: () => import("@/pages/user/views/sellerList/index.vue"),
      },
      {
        path: "announcement/detail/:id",
        name: "AnnouncementDetail",
        component: () => import("@/pages/user/views/announcement/index.vue"),
      },
    ],
  },
  {
    path: "/userAudit",
    name: "UserAudit",
    redirect: "/userAudit/list",
    component: () => import("@/pages/userAudit/index.vue"),
    children: [
      {
        path: "list",
        name: "UserAuditList",
        component: () => import("@/pages/userAudit/views/list/index.vue"),
      },
      {
        path: "detail/:id",
        name: "UserAuditDetail",
        component: () => import("@/pages/userAudit/views/detail/index.vue"),
      },
      {
        path: "transactionAuditList",
        name: "TransactionAuditList",
        component: () =>
          import("@/pages/transactionAudit/views/list/index.vue"),
      },
      {
        path: "transactionAuditDetail/:id",
        name: "TransactionAuditDetail",
        component: () =>
          import("@/pages/transactionAudit/views/detail/index.vue"),
      },
      {
        path: "announcementAdd",
        name: "AnnouncementAdd",
        component: () =>
          import("@/pages/userAudit/views/announcementAdd/index.vue"),
      },
      {
        path: "announcementVerify",
        name: "AnnouncementVerify",
        component: () =>
          import("@/pages/userAudit/views/announcementVerify/index.vue"),
      },
      {
        path: "announcementDetail/:id",
        name: "AnnouncementVerifyDetail",
        component: () =>
          import("@/pages/userAudit/views/announcementDetail/index.vue"),
      },
      {
        path: "announcementChange/:id",
        name: "AnnouncementChange",
        component: () =>
          import("@/pages/userAudit/views/announcementChange/index.vue"),
      },
    ],
  },
];
export default routes;
